<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>sampleFile - OpenGrok cross reference for /sampleFile</title></head><body>
<a class="l" name="1" href="#1">1</a><span class="c">/*</span>
<a class="l" name="2" href="#2">2</a><span class="c"> * This Source Code Form is subject to the terms of the Mozilla Public</span>
<a class="l" name="3" href="#3">3</a><span class="c"> * License, v. 2.0. If a copy of the MPL was not distributed with this</span>
<a class="l" name="4" href="#4">4</a><span class="c"> * file, You can obtain one at <a href="http://mozilla.org/MPL/2.0/">http://mozilla.org/MPL/2.0/</a>.</span>
<a class="l" name="5" href="#5">5</a><span class="c"> */</span>
<a class="l" name="6" href="#6">6</a>
<a class="l" name="7" href="#7">7</a><span class="c">/*</span>
<a class="l" name="8" href="#8">8</a><span class="c"> * This is derived from Caiyeon <a href="/source/s?path=goldfish/">goldfish</a>/<a href="/source/s?path=goldfish/config/">config</a>/<a href="/source/s?path=goldfish/config/sample.hcl">sample.hcl</a> just for testing</span>
<a class="l" name="9" href="#9">9</a><span class="c"> * OpenGrok&apos;s HCL handling and modified arbitrarily to test other HCL syntax.</span>
<a class="hl" name="10" href="#10">10</a><span class="c"> */</span>
<a class="l" name="11" href="#11">11</a>
<a class="l" name="12" href="#12">12</a><span class="c"># [Required] listener defines how goldfish will listen to incoming connections</span>
<a class="l" name="13" href="#13">13</a><a href="/source/s?defs=listener" class="intelliWindow-symbol" data-definition-place="undefined-in-file">listener</a> <span class="s">&quot;tcp&quot;</span> {
<a class="l" name="14" href="#14">14</a>	<span class="c"># [Required] [Format: &quot;address&quot;, &quot;address:port&quot;, or &quot;:port&quot;]</span>
<a class="l" name="15" href="#15">15</a>	<span class="c"># goldfish&apos;s listening address <a href="/source/s?path=and/">and</a>/<a href="/source/s?path=and/or">or</a> port. Simply &quot;:443&quot; would suffice.</span>
<a class="l" name="16" href="#16">16</a>	<a href="/source/s?defs=address" class="intelliWindow-symbol" data-definition-place="undefined-in-file">address</a>          = <span class="s">&quot;:8000&quot;</span>
<a class="l" name="17" href="#17">17</a>
<a class="l" name="18" href="#18">18</a>	<span class="c"># [Optional] [Default: 0] [Allowed values: 0, 1]</span>
<a class="l" name="19" href="#19">19</a>	<span class="c"># set to 1 to disable tls &amp; https</span>
<a class="hl" name="20" href="#20">20</a>	<a href="/source/s?defs=tls_disable" class="intelliWindow-symbol" data-definition-place="undefined-in-file">tls_disable</a>      = <span class="n">1</span>
<a class="l" name="21" href="#21">21</a>
<a class="l" name="22" href="#22">22</a>	<span class="c"># [Optional] [Default: 0] [Allowed values: 0, 1]</span>
<a class="l" name="23" href="#23">23</a>	<span class="c"># set to 1 to redirect port 80 to 443 (hard-coded port numbers)</span>
<a class="l" name="24" href="#24">24</a>	<a href="/source/s?defs=tls_autoredirect" class="intelliWindow-symbol" data-definition-place="undefined-in-file">tls_autoredirect</a> = <span class="n">0</span>
<a class="l" name="25" href="#25">25</a>
<a class="l" name="26" href="#26">26</a>	<span class="c"># Option 1: local certificate</span>
<a class="l" name="27" href="#27">27</a>	<a href="/source/s?defs=certificate" class="intelliWindow-symbol" data-definition-place="undefined-in-file">certificate</a> <span class="s">&quot;local&quot;</span> {
<a class="l" name="28" href="#28">28</a>		<a href="/source/s?defs=cert_file" class="intelliWindow-symbol" data-definition-place="undefined-in-file">cert_file</a> = <span class="s">&quot;/<a href="/source/s?path=/path/">path</a>/<a href="/source/s?path=/path/to/">to</a>/<a href="/source/s?path=/path/to/certificate.cert">certificate.cert</a>&quot;</span>
<a class="l" name="29" href="#29">29</a>		<a href="/source/s?defs=key_file" class="intelliWindow-symbol" data-definition-place="undefined-in-file">key_file</a>  = <span class="s">&quot;/<a href="/source/s?path=/path/">path</a>/<a href="/source/s?path=/path/to/">to</a>/<a href="/source/s?path=/path/to/keyfile.pem">keyfile.pem</a>&quot;</span>
<a class="hl" name="30" href="#30">30</a>	}
<a class="l" name="31" href="#31">31</a>
<a class="l" name="32" href="#32">32</a>	<span class="c"># Option 2: using Vault&apos;s PKI backend [Requires vault_token at launch time]</span>
<a class="l" name="33" href="#33">33</a>	<span class="c"># goldfish will request new certificates at half-life and hot-reload,</span>
<a class="l" name="34" href="#34">34</a>	<a href="/source/s?defs=pki_certificate" class="intelliWindow-symbol" data-definition-place="undefined-in-file">pki_certificate</a> <span class="s">&quot;pki&quot;</span> {
<a class="l" name="35" href="#35">35</a>		<span class="c"># [Required]</span>
<a class="l" name="36" href="#36">36</a>		<a href="/source/s?defs=pki_path" class="intelliWindow-symbol" data-definition-place="undefined-in-file">pki_path</a>    = <span class="s">&quot;<a href="/source/s?path=pki/">pki</a>/<a href="/source/s?path=pki/issue">issue</a>/&lt;role_name&gt;&quot;</span>
<a class="l" name="37" href="#37">37</a>		<a href="/source/s?defs=common_name" class="intelliWindow-symbol" data-definition-place="undefined-in-file">common_name</a> = <span class="s">&quot;goldfish.vault.service&quot;</span>
<a class="l" name="38" href="#38">38</a>
<a class="l" name="39" href="#39">39</a>		<span class="c"># [Optional] see Vault PKI docs for what these mean</span>
<a class="hl" name="40" href="#40">40</a>		<a href="/source/s?defs=alt_names" class="intelliWindow-symbol" data-definition-place="undefined-in-file">alt_names</a>   = [<span class="s">&quot;goldfish.vault.srv&quot;</span>, <span class="s">&quot;ui.vault.srv&quot;</span>]
<a class="l" name="41" href="#41">41</a>		<a href="/source/s?defs=ip_sans" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ip_sans</a>     = [<span class="s">&quot;10.0.0.10&quot;</span>, <span class="s">&quot;127.0.0.1&quot;</span>, <span class="s">&quot;172.0.0.1&quot;</span>]
<a class="l" name="42" href="#42">42</a>	}
<a class="l" name="43" href="#43">43</a>}
<a class="l" name="44" href="#44">44</a>
<a class="l" name="45" href="#45">45</a><span class="c"># [Required] vault defines how goldfish should bootstrap to vault</span>
<a class="l" name="46" href="#46">46</a><a href="/source/s?defs=vault" class="intelliWindow-symbol" data-definition-place="undefined-in-file">vault</a> {
<a class="l" name="47" href="#47">47</a>	<span class="c"># [Required] [Format: &quot;protocol://address:port&quot;]</span>
<a class="l" name="48" href="#48">48</a>	<span class="c"># This is vault&apos;s address. Vault must be up before goldfish is deployed!</span>
<a class="l" name="49" href="#49">49</a>	<a href="/source/s?defs=address" class="intelliWindow-symbol" data-definition-place="undefined-in-file">address</a>         = <span class="s">&quot;<a href="http://127.0.0.1:8200">http://127.0.0.1:8200</a>&quot;</span>
<a class="hl" name="50" href="#50">50</a>
<a class="l" name="51" href="#51">51</a>	<span class="c"># [Optional] [Default: 0] [Allowed values: 0, 1]</span>
<a class="l" name="52" href="#52">52</a>	<span class="c"># Set this to 1 to skip verifying the certificate of vault (e.g. self-signed certs)</span>
<a class="l" name="53" href="#53">53</a>	<a href="/source/s?defs=tls_skip_verify" class="intelliWindow-symbol" data-definition-place="undefined-in-file">tls_skip_verify</a> = <span class="n">0</span>
<a class="l" name="54" href="#54">54</a>
<a class="l" name="55" href="#55">55</a>	<span class="c"># [Required] [Default: &quot;<a href="/source/s?path=secret/">secret</a>/<a href="/source/s?path=secret/goldfish">goldfish</a>&quot;]</span>
<a class="l" name="56" href="#56">56</a>	<span class="c"># This should be a generic secret endpoint where runtime settings are stored</span>
<a class="l" name="57" href="#57">57</a>	<span class="c"># See wiki for what key values are required in this</span>
<a class="l" name="58" href="#58">58</a>	<a href="/source/s?defs=runtime_config" class="intelliWindow-symbol" data-definition-place="undefined-in-file">runtime_config</a>  = <span class="s">&quot;<a href="/source/s?path=secret/">secret</a>/<a href="/source/s?path=secret/goldfish">goldfish</a>&quot;</span>
<a class="l" name="59" href="#59">59</a>
<a class="hl" name="60" href="#60">60</a>	<span class="c"># [Optional] [Default: &quot;<a href="/source/s?path=auth/">auth</a>/<a href="/source/s?path=auth/approle/">approle</a>/<a href="/source/s?path=auth/approle/login">login</a>&quot;]</span>
<a class="l" name="61" href="#61">61</a>	<span class="c"># You can omit this, unless you mounted approle somewhere weird</span>
<a class="l" name="62" href="#62">62</a>	<a href="/source/s?defs=approle_login" class="intelliWindow-symbol" data-definition-place="undefined-in-file">approle_login</a>   = <span class="s">&quot;<a href="/source/s?path=auth/">auth</a>/<a href="/source/s?path=auth/approle/">approle</a>/<a href="/source/s?path=auth/approle/login">login</a>&quot;</span>
<a class="l" name="63" href="#63">63</a>
<a class="l" name="64" href="#64">64</a>	<span class="c"># [Optional] [Default: &quot;goldfish&quot;]</span>
<a class="l" name="65" href="#65">65</a>	<span class="c"># You can omit this if you already customized the approle ID to be &apos;goldfish&apos;</span>
<a class="l" name="66" href="#66">66</a>	<a href="/source/s?defs=approle_id" class="intelliWindow-symbol" data-definition-place="undefined-in-file">approle_id</a>      = <span class="s">&quot;goldfish&quot;</span>
<a class="l" name="67" href="#67">67</a>
<a class="l" name="68" href="#68">68</a>	<span class="c"># [Optional] [Default: &quot;&quot;]</span>
<a class="l" name="69" href="#69">69</a>	<span class="c"># If provided, goldfish will use this CA cert to verify Vault&apos;s certificate</span>
<a class="hl" name="70" href="#70">70</a>	<span class="c"># This should be a path to a PEM-encoded CA cert file</span>
<a class="l" name="71" href="#71">71</a>	<a href="/source/s?defs=ca_cert" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ca_cert</a>         = <span class="s">&quot;&quot;</span>
<a class="l" name="72" href="#72">72</a>
<a class="l" name="73" href="#73">73</a>	<span class="c"># [Optional] [Default: &quot;&quot;]</span>
<a class="l" name="74" href="#74">74</a>	<span class="c"># See above. This should be a path to a directory instead of a single cert</span>
<a class="l" name="75" href="#75">75</a>	<a href="/source/s?defs=ca_path" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ca_path</a>         = <span class="s">&quot;&quot;</span>
<a class="l" name="76" href="#76">76</a>}
<a class="l" name="77" href="#77">77</a>
<a class="l" name="78" href="#78">78</a><span class="c"># [Optional] [Default: 0] [Allowed values: 0, 1]</span>
<a class="l" name="79" href="#79">79</a><span class="c"># Set to 1 to disable mlock. Implementation is similar to vault - see vault docs for details</span>
<a class="hl" name="80" href="#80">80</a><span class="c"># This option will be ignored on unsupported platforms (e.g Windows)</span>
<a class="l" name="81" href="#81">81</a><a href="/source/s?defs=disable_mlock" class="intelliWindow-symbol" data-definition-place="undefined-in-file">disable_mlock</a> = <span class="n">0</span>
<a class="l" name="82" href="#82">82</a></body>
</html>
